<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="" content="">
  <title></title>
  <style></style>
</head>

<body>
  <p>ok</p>

  <script>

    class User {
      constructor(name, pass){
        this.name = name
        this.pass = pass
      }
      showName(){ alert(this.name) }
      showPass(){ alert(this.pass) }
    } //User

    class VipUser extends User {
      constructor(name, pass, vip){
        super(name, pass)
        this.vip = vip
      }
      showVip(){ alert(this.vip) }
    } //V

    var a = new VipUser('张三', '123456', '123')
  </script>
</body>

</html>